package com.cskaoyan.mapper;

import com.cskaoyan.bean.Coupon;
import com.cskaoyan.bean.CouponExample;

import java.math.BigDecimal;
import java.util.List;

import com.cskaoyan.vo.CouponListMsgVo;

import com.cskaoyan.vo.CouponWxVo;
import com.cskaoyan.vo.ListWxVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface CouponMapper {
    long countByExample(CouponExample example);

    int deleteByExample(CouponExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Coupon record);

    int insertSelective(Coupon record);

    List<Coupon> selectByExample(CouponExample example);

    List<ListWxVo> selectByList(CouponExample example);

    List<CouponWxVo> selectByMyself(CouponExample example);

    Coupon selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Coupon record, @Param("example") CouponExample example);

    int updateByExample(@Param("record") Coupon record, @Param("example") CouponExample example);

    int updateByPrimaryKeySelective(Coupon record);


    int updateByPrimaryKey(Integer record);


    List<CouponListMsgVo> selectCouponByIds(@Param("couponIds") List<Integer> couponIds, @Param("totalPrice") BigDecimal totalPrice);

    List<CouponListMsgVo> selectAllCoupon();

   // Integer selectCouponCountByUidAndCid(@Param("userId") Integer userId, @Param("couponId") Integer couponId);

}